<div class='event-data-holder'>
	<div class='event-data-holder-inside'>

		<div id='event-menu'>
			
			<ul>

        <% if @session_view %>
          <li>
            <%= link_to "View All Sessions", results_path({
              :title => "Event Sessions",
              :match_all => true,
              :search => {
                :source_address => { :column => :source_ip, :operator => :is, :value => @event.ip.ip_src.to_s },
                :destination_address => { :column => :destination_ip, :operator => :is, :value => @event.ip.ip_dst.to_s },
                :signature => { :column => :signature, :operator => :is, :value => @event.signature.sig_id },
                :sensor => { :column => :sensor, :operator => :is, :value => @event.sid },
                :classification => { :column => :classification, :operator => :isnull, :value => '' }
              }
            }), :class => 'dark-button' %>
          </li>
        <% end %>

				<li><%= link_to "Perform Mass Classification", create_mass_action_events_path(:sid => @event.sid, :cid => @event.cid), :class => 'snorbybox dark-button' %></li>

				<% if Setting.packet_capture? %>
				
					<li>
						<%= link_to "Packet Capture Options", '#', :class => 'dark-button has-event-menu' %>
						<dl class='event-sub-menu round shadow' style='display:none;'>
							
							<% if @event.ip.present? %>
							
							<dd>
								<%= link_to "Source (1 Hour)", "#{@event.packet_capture(:source_ip => @event.ip.ip_src.to_s,
								:start_time => (@event.timestamp - 30.minute), 
								:end_time => (@event.timestamp + 30.minute))}" %>
							</dd>
							
							<dd><%= link_to "Destination (1 Hour)", "#{@event.packet_capture(:destination_ip => @event.ip.ip_dst.to_s,
								:start_time => (@event.timestamp - 30.minute), 
								:end_time => (@event.timestamp + 30.minute))}" %>
							</dd>
							
							<dd><%= link_to "Source & Destination (1 Hour)", "#{@event.packet_capture(:source_ip => @event.ip.ip_src.to_s, 
								:destination_ip => @event.ip.ip_dst.to_s, 
								:start_time => (@event.timestamp - 30.minute), 
								:end_time => (@event.timestamp + 30.minute))}" %>
							</dd>
							
							<% end %>
							
							<dd><%= link_to "Custom", packet_capture_events_path(:sid => @event.sid, :cid => @event.cid), :class => 'snorbybox' %></dd>
						</dl>
					</li>
					
				<% end %>
				
				<li>
					<%= link_to "Event Export Options", '#', :class => 'dark-button has-event-menu' %>
					<dl class='event-sub-menu round shadow' style='display:none;'>
						<dd><%= link_to "XML", "#{Snorby::CONFIG[:baseuri]}/events/show/#{@event.sid}/#{@event.cid}.xml", :class => '' %></dd>
						<dd><%= link_to "E-mail Event", create_email_events_path(:sid => @event.sid, :cid => @event.cid), :class => 'snorbybox' %></dd>
					</dl>
				</li>
				
				<li><%= link_to "Permalink", view_events_url(:sid => @event.sid, :cid => @event.cid), :class => 'dark-button' %></li>

			</ul>
			
		</div>

		<%= render :partial => 'events/ip' if @event.ip.present? %>
		
		<%= render :partial => 'events/signature' %>

		<% if @event.tcp? %>
			<%= render :partial => 'events/tcp' %>
		<% elsif @event.udp? %>
			<%= render :partial => 'events/udp' %>
		<% elsif @event.icmp? %>
			<%= render :partial => 'events/icmp' %>
		<% else %>
			
		<% end %>

    <%= render :partial => 'events/refs' if @event.signature.sig_references.present? %>

		<% if @event.payload %>
		

			<ul class='payload-tabs plus-side'>
				<div id="tab-title">Payload</div>
				<li class='round_top'><%= link_to "Ascii", '#', :"data-div" => 'payload-ascii' %></li>
				<li class='current round_top'><%= link_to "Hex", '#', :"data-div" => 'payload' %></li>
			</ul>
		
			<div class='payload-ascii plus-side payload-holder' style='display:none'><pre><%= @event.payload.to_ascii %></pre></div>

			<div class='payload plus-side payload-holder'><pre><%= @event.payload.to_html %></pre></div>
			
		<% else %>
		
			<div class='section-title plus-side bottom-none'>Payload</div>
		
			<div class='payload plus no-overflow' style='padding:10px;overflow: hidden;'>No Payload Data Available</div>
		
		<% end %>
				
		<%= render :partial => 'events/notes' %>
		
	</div>
	
</div>
